package priv.mill.inner;

public class EntyDemo {

	private String[] arr={
		"first","secend","three"
	};
	
	private int top;
	public static void main(String[] args) {
		Enty entyDemo = new EntyDemo().iterator();
		while(entyDemo.hasNext()){
			System.out.println(entyDemo.next());
		}
		
		
		
	}
	
	public Enty iterator(){
		return this.new Enty();
	}

	private class Enty{

		private String next() {
			return arr[top++];
		}

		public boolean hasNext() {
			return top<arr.length;
			
		}
		
	}
	
}
